Skip to content

Add rolling function as options#1

Open
Japjappedulap wants to merge 2 commits into
masterfrom
rolling-function-proposal
Open

Add rolling function as options#1
Japjappedulap wants to merge 2 commits into
masterfrom
rolling-function-proposal

Conversation

@Japjappedulap

Copy link
Copy Markdown

A new option rollingFunction was added. This will determine if the cookie will be set on a request, similar to the rolling option.

Session are rolled by default only on the store, without their .cookie being altered. On each request, a touch is made to the store, meaning that the object's expire is reseted and will live longer than the user's session, leading to different expire dates between the store and the user session. This behaviour has already been reported.

Using rolling will set-cookie with the same session ID, but with reseted maxAge, this is the desired behaviour, as the session is extended and the expires are equal between the client and the server.

Somehow, we need to be able to conditionally or manually roll sessions. This is where rollingFunction comes in handy.

A new option `rollingFunction` was added. This will determine if the cookie will be set on a request, similar to the `rolling` option.
@Japjappedulap Japjappedulap added the enhancement New feature or request label Nov 29, 2019
@Japjappedulap Japjappedulap added the do not merge do not merge label Nov 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not merge do not merge enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant